import { IsString } from "class-validator";
import { BaseEntity } from "../BaseEntity";
import { Model } from "sequelize";

export default class PosterSetEntity extends BaseEntity {
  id?: number;
  
  @IsString()
  public link: string;

  @IsString()
  public imgUrl: string;

  public static transform(plainObject: object): PosterSetEntity {
    return super.baseTransform(PosterSetEntity, plainObject);
  }
}

export interface IPosterSetModel extends Model<PosterSetEntity> {}

/**
 * 导入的字段映射对象
 */
export const importFieldMap: Omit<PosterSetEntity, "validateThis"> = {
  link: "link",imgUrl: "imgUrl"
};
